<template>
    <div>
        主页
    </div>
</template>
<script>
export default {
  methods: {
    hClick () {
      const p = this.$axios({
        url: 'http://www.liulongbin.top:3006/api/getbooks',
        method: 'GET'
      })
      p.then((data) => {
        console.log(data)
      }).catch((err) => {
        console.log(err)
      })
    },
    async hClick2 () {
      try {
        console.log(1)
        const res = await this.$axios({
          url: 'http://www.liulongbin.top:3006/api/getbooks',
          method: 'GET'
        })
        console.log(res)
      } catch (err) {
        console.log(err)
      }
    }
  }
}
</script>
